# -*- coding: UTF-8 -*-
from server.model import Base
from sqlalchemy.sql.functions import now
from sqlalchemy import Column, BigInteger, String, DateTime, Boolean, SmallInteger


class SysUser(Base):
    __tablename__ = 'sys_user'
    id = Column(BigInteger, primary_key=True, nullable=False, doc='')
    uuid = Column(String(191), doc='用户UUID', nullable=True, default=None)
    username = Column(String(191), doc='昵称')
    password = Column(String(191), doc='密码')
    nick_name = Column(String(191), doc='用户登录名', default='系统用户')
    header_img = Column(String(191), doc="用户头像", default='http://qmplusimg.henrongyi.top/head.png')
    status = Column(SmallInteger, default=0, doc='账号状态')
    authority_id = Column(String(191), default="888", doc="用户角色ID")
    created_at = Column(DateTime, default=now(), doc='')
    updated_at = Column(DateTime, default=now(), doc='')
    deleted_at = Column(DateTime, doc='')
    deleted = Column(Boolean, default=0, doc='')
